﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 飞机大战
{
    enum State
    {
        NoGameStarted,
        GameStarted,
        GameEnded,
        GamePaused,
        GameStopped,
        MyPlane,
        EnemyPlane,
        Boss,
    }
    internal class Game
    {
        //X轴坐标
        public int X { get; set; }
        //Y轴坐标
        public int Y { get; set; }
        //宽度
        public int Width { get; set; }
        //高度
        public int Height { get; set; }
        //图片
        public Image[] Images { get; set; }
        //变化速度（每次移动的距离）
        public int Speed { get; set; }
        //状态
        public State State { get; set; }

        public Game(int x, int y, int width, int height, Image[] images, int speed, State state)
        {
            X = x;
            Y = y;
            Width = width;
            Height = height;
            Images = images;
            Speed = speed;
            State = state;
        }

        public virtual void Draw(Graphics g) { }
        public virtual Rectangle GetRectangle() 
        { 
            return new Rectangle(X, Y, Width, Height);
        }
    }
}
